<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('number', 10)->nullable();
            $table->string('openid', 70)->nullable();
            $table->string('nickname', 70)->nullable();
            $table->string('avatar_url', 120)->nullable();
            $table->string('province', 70)->nullable();
            $table->string('city', 70)->nullable();
            $table->string('area', 70)->nullable();
            $table->enum('wx_sex', ['1', '2'])->nullable();
            $table->enum('sex', ['1', '2'])->nullable();
            $table->tinyInteger('age')->nullable();
            $table->string('occupation', 40)->nullable();
            $table->string('hobby', 40)->nullable();
            $table->enum('is_firend', ['1', '2'])->nullable();
            $table->string('firend_number', 10)->nullable();
            $table->enum('firend_sex', ['1', '2'])->nullable();
            $table->string('goal', 1000)->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
